package jataaka.gui;

import java.util.ArrayList;
import java.util.List;

/**
 * Some utilities for Jataaka GUI
 * 
 * @author Juan Carlos Cancela
 */
public class JataakaGUIUtils {

    /**
     * transform a comma separated list of elements to an array of Strings
     * @param i the information as String sepparated by comma
     * @return the information as an array
     */
    public static List<String> transformFromCommaSepparatedStringToList(String i){
        List<String> aRes = new ArrayList<String>();

        String[] res = i.split( ",\\s*" );

        for(String element : res){
            aRes.add(element);
        }

        return aRes;
    }

}
